from django.contrib import admin

from .models import ExaminationQuestions


@admin.register(ExaminationQuestions)
class ExaminationQuestionsAdmin(admin.ModelAdmin):
    class Media:
        css = {
            'all': ('admin/css/custom.css',)
        }
    # # 我将添加需要查询的字段到 search_fields 中
    search_fields = ['id', 'question_source_id', 'question', 'question_class', 'question_type']
    # # 指定可过滤的字段
    list_filter = ['question_source__name','question_class','question_type']
    # 我将添加需要显示的字段到 list_display 中
    list_display = ('id','question',  'options', 'answer')
    # 我将添加需要排序的字段到 ordering 中
    ordering = ('id',)
    # 分页
    list_per_page = 10
    # 增加list_filter部分的宽度




